@echo off

set _JHI=D:\_USB\Program\java\jh2.0\javahelp\bin\jhindexer.bat

set _JAR=D:\_USB\Program\java\jdk1.6.0_45\bin\jar

if exist "!1_Update_html+helpset_in_jar.cmd" goto ok
echo Error - FILE NOT FOUND: "!1_Update_html+helpset_in_jar.cmd"
goto end
:ok
echo.
echo ------------------------------
echo Making javaHelp search indexes
echo ------------------------------
cd src\javahelp
echo Current directory:
cd
if exist "helpset.hs" goto cont_hs
echo.
echo.
echo ************************************************
echo !!    Error - FILE NOT FOUND: "helpset.hs"    !?
echo ************************************************
echo.
echo.
goto end
:cont_hs
echo.
echo call %_JHI% -verbose ..\html
echo please wait...
call %_JHI% -verbose ..\html >..\..\indexer_output01.log
echo Done:  javaHelp indexes have been updated.
echo.
cd ..\..
echo Current directory:
cd
echo.
echo -----------------------------
echo Updating javaHelp in jar-file
echo -----------------------------
echo (going to update html-files in "store\Chem_Diagr_Help.jar")
if exist store\Chem_Diagr_Help.jar goto cont_jar_upd
echo.
echo.
echo *********************************************************
echo !!    Error - FILE NOT FOUND: "store\Chem_Diagr_Help.jar"    !?
echo *********************************************************
echo.
echo.
goto end
:cont_jar_upd
pause
cd src
echo Current directory:
cd
echo.
echo please wait...
%_JAR% uvf ..\store\Chem_Diagr_Help.jar html\*.*  >..\jar_output.log
echo html-files have been updated in jar-file.
%_JAR% uvf ..\store\Chem_Diagr_Help.jar javahelp/*.*  >>..\jar_output.log
echo javahelp-files have been updated in jar-file.
cd ..
echo.
echo All done.
:end
@pause
